package com.mmall.product.mapper;

import com.mmall.pojo.entity.ProductEntity;
import com.mmall.pojo.entity.ProductSkuEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created by Mybatis Generator 2019/05/05
 *
 * @author guigu
 */
@Mapper
public interface ProductSkuMapper {

    /**
     * 选择插入
     *
     * @param record ProductSkuEntity
     * @return int
     */
    int insertSelective(ProductSkuEntity record);

    /**
     * 主键查询
     *
     * @param id 主键
     * @return ProductSkuEntity
     */
    ProductSkuEntity selectByPrimaryKey(Long id);

    /**
     * 选择性更新
     *
     * @param record ProductSkuEntity
     * @return int
     */
    int updateByPrimaryKeySelective(ProductSkuEntity record);

    /**
     * 根据商品id查询
     *
     * @param productId 商品id
     * @return List<ProductEntity>
     */
    List<ProductEntity> selectByProductId(Long productId);
}